package com.smartfast4j.manager.modules.sys.service.impl;


import com.smartfast4j.manager.modules.sys.service.SysLogService;
import com.smartfast4j.mapper.sys.SysLogMapper;
import com.smartfast4j.pojo.sys.SysLog;
import com.smartfast4j.pojo.sys.SysLogExample;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysLogServiceImpl implements SysLogService {
    @Autowired
    private SysLogMapper sysLogMapper;

    private static final Logger logger = LoggerFactory.getLogger(SysLogServiceImpl.class);

    public int countByExample(SysLogExample example) {
        int count = this.sysLogMapper.countByExample(example);
        logger.debug("count: {}", count);
        return count;
    }

    public SysLog selectByPrimaryKey(Long id) {
        return this.sysLogMapper.selectByPrimaryKey(id);
    }

    public List<SysLog> selectByExample(SysLogExample example) {
        return this.sysLogMapper.selectByExample(example);
    }

    public int deleteByPrimaryKey(Long id) {
        return this.sysLogMapper.deleteByPrimaryKey(id);
    }

    public int updateByPrimaryKeySelective(SysLog record) {
        return this.sysLogMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(SysLog record) {
        return this.sysLogMapper.updateByPrimaryKey(record);
    }

    public int deleteByExample(SysLogExample example) {
        return this.sysLogMapper.deleteByExample(example);
    }

    public int updateByExampleSelective(SysLog record, SysLogExample example) {
        return this.sysLogMapper.updateByExampleSelective(record, example);
    }

    public int updateByExample(SysLog record, SysLogExample example) {
        return this.sysLogMapper.updateByExample(record, example);
    }

    public int insert(SysLog record) {
        return this.sysLogMapper.insert(record);
    }

    public int insertSelective(SysLog record) {
        return this.sysLogMapper.insertSelective(record);
    }

    public int insertBatchSelective(List<SysLog> records) {
        return this.sysLogMapper.insertBatchSelective(records);
    }

    public int updateBatchByPrimaryKeySelective(List<SysLog> records) {
        return this.sysLogMapper.updateBatchByPrimaryKeySelective(records);
    }

    /**
     * 查找模块名
     * @return List<String>
     */
    @Override
    public List<String> getModuleNameList() {
        return this.sysLogMapper.getModuleNameList();
    }
}